package com.shrct.businessprocess.purchase;

import com.shrct.businessprocess.budget.RCBudget;
import com.shrct.businessprocess.product.RCProductServiceTracer;
import com.shrct.businessprocess.purchase.IHasServicePurchase;
import com.shrct.businessprocess.purchase.RCBudgetContract;
import com.shrct.businessprocess.purchase.RCHasPurchaseBudget;
import com.shrct.businessprocess.purchase.RCServiceProductPurchaseRequest;
import com.shrct.businessprocess.purchase.proxy.RCBudgetContractServicePurchaseAdaptorProxy;
import edu.fudan.mylang.pf.EntityAdaptor;

public class RCBudgetContractServicePurchaseAdaptor extends EntityAdaptor<RCBudgetContract> implements IHasServicePurchase {
  public RCBudgetContractServicePurchaseAdaptor() {
    super();
  }
  
  public RCBudgetContractServicePurchaseAdaptor(final RCBudgetContract adaptee) {
    this.adaptee = adaptee;
  }
  
  public RCBudgetContractServicePurchaseAdaptorProxy toProxy() {
    return new RCBudgetContractServicePurchaseAdaptorProxy(adaptee.toProxy());
  }
  
  public RCServiceProductPurchaseRequest createServiceProductPurchaseRequest() {
    RCBudget _budget = this.adaptee.getBudget();
    RCServiceProductPurchaseRequest _createServiceProductPurchaseRequest = ((IHasServicePurchase) _budget).createServiceProductPurchaseRequest();
    return _createServiceProductPurchaseRequest;
  }
  
  public Iterable<RCServiceProductPurchaseRequest> getServicePurchaseRequests() {
    RCBudget _budget = this.adaptee.getBudget();
    Iterable<RCServiceProductPurchaseRequest> _servicePurchaseRequests = ((IHasServicePurchase) _budget).getServicePurchaseRequests();
    return _servicePurchaseRequests;
  }
  
  public Iterable<RCProductServiceTracer> getRCProductServiceTracer() {
    Iterable<RCProductServiceTracer> _rCProductServiceTracer = this.adaptee.getRCProductServiceTracer();
    return _rCProductServiceTracer;
  }
  
  public RCHasPurchaseBudget asBudget() {
    RCBudget _budget = this.adaptee.getBudget();
    return ((RCHasPurchaseBudget) _budget);
  }
}
